package com.xinqi.modules.chat.chat.friend.controller.inner;

import com.xinqi.common.base.response.R;
import com.xinqi.modules.chat.chat.friend.service.ChatFriendService;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;

/**
 * 接口 -- 好友
 *
 * @author: system
 * @date: 2023/01/12
 */
@Hidden
@Validated
@RestController
@RequestMapping("/inner/chat-friend")
@RequiredArgsConstructor
public class ChatFriendInnerController {
    private final ChatFriendService chatFriendService;

    @Operation(summary = "注册初始化好友（添加自己、新奇提醒、新奇助手为好友）")
    @PostMapping("/initFriend")
    public R<Boolean> initFriend(@NotNull(message = "user.id.not.black") @RequestParam("userId") Long userId) {
        return R.data(chatFriendService.initFriend(userId));
    }

}
